package com.cosc654.ecash.test;

import com.cosc645.ecash.MoneyOrder;
import com.cosc645.ecash.SerializationHelper;
import org.junit.Test;


public class test {

    @Test
    public void searlizationTest() {
        MoneyOrder moneyOrder = new MoneyOrder(100);
        System.out.println(moneyOrder);
        byte[] bytes = SerializationHelper.serializedObject(moneyOrder);
        System.out.println(bytes);
        MoneyOrder mo = (MoneyOrder)SerializationHelper.deserializedObject(bytes);
        System.out.println(mo);

        assert moneyOrder.getAmount() == mo.getAmount();


    }
}
